﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TimKenSite.Master" AutoEventWireup="true" CodeBehind="ShopProJect.aspx.cs" Inherits="TimKen.Web.Shop.ShopProJect" %>

<%@ Register Src="../UserControls/UserCenter.ascx" TagName="UserCenter" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   <link href="../Common/Style/PagerStyle.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="server">
 <uc1:UserCenter ID="ucUserCenter" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" runat="server">
	<form id="form1" runat="server">
    <script type="text/javascript">
        $(function () {

            $(".close_span").click(function () {
                $("#warpbox").hide();
                $("#addbalck").hide();
            });
            $("#body_gvShopCart_chk_Xz").click(function () { //":checked"匹配所有的复选框
                var ss = $(this).attr("checked");
                if ($(this).attr("checked") == "checked") {
                    var s = $("#body_gvShopCart");
                    $("#body_gvShopCart :checkbox").attr("checked", true); //"#div1 :checked"之间必须有空格checked是设置选中状态。如果为true则是选中fo否则false为不选中 
                }
                else {
                    $("#body_gvShopCart :checkbox").attr("checked", false);
                }
            });
        })
        function ShowBox(url) {
            $("#addbalck").css("height", $(document.body).height());
            $("#addbalck").show();
            $("#warpbox").show().css("top", $(document).scrollTop() + ($(window).height() - $("#warpbox").height()) / 2);
            $(".wprpbox_div>#ifm").attr("src", url);

        }
        function Hide() {
            $("#warpbox").hide();
            $("#addbalck").hide();
        }
        function SubMit() {
            var num = "<%=ShopCart.GetItems.Count %>";
            if (num >= 1) {
                return confirm('您确定要删除?');
            } else {
            return false;
            }
//            if (num <= 0) {
//                return false;
//            } else {
//            return true;
//            }
        }

    </script>
	<div class="car common_border">
      
            	<ul class="car_step">
                	<img src="../Common/Image/iconbtnbg/car_gwc.gif" /><img src="../Common/Image/iconbtnbg/car_qrfh.gif" /><img src="../Common/Image/iconbtnbg/car_tjdd.gif" />
                </ul>
                
                <ul class="car_box">
                	
                    <div class="car_top fix">
                    	<ul class="car_top_only floatleft">
                        <asp:CheckBox Text="只显示错误订单行" AutoPostBack="true" runat="server" ID="chk_edclick" 
                                oncheckedchanged="chk_edclick_CheckedChanged"   />
                        	<%--<input type="checkbox" />--%>
                        </ul>
                        <ul class="car_top_btn floatright">
                        	<a href="../Product.aspx"><img src="../Common/Image/iconbtnbg/car_fhjxgw.gif" /></a><img src="../Common/Image/iconbtnbg/car_pltxdd.gif" onclick="ShowBox('InsertShop.aspx?isType=1')" /><img src="../Common/Image/iconbtnbg/car_drddmb.gif" onclick="ShowBox('InsertShop.aspx?isType=2')" /><a href="../Shop/OrderHistory.aspx"><img src="../Common/Image/iconbtnbg/car_fzlsdd.gif" /></a>
                        </ul>
                    </div>
                    
                    <div class="car_table">

                        <asp:GridView ID="gvShopCart" runat="server"  Width="100%" 
                            AutoGenerateColumns="False" onrowcommand="gvShopCart_RowCommand" 
                            onrowdatabound="gvShopCart_RowDataBound"   >
                           <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <asp:CheckBox ID="chk_Xz" runat="server"  Text="行号"/>
                                </HeaderTemplate>
                                <ItemTemplate>
                                 <asp:CheckBox ID="chk_Xz" runat="server"/>  <%#Container.DataItemIndex+1%>
                                </ItemTemplate>
                            </asp:TemplateField>
                               <asp:TemplateField HeaderText="产品编号" >
                               <ItemTemplate>
                                   <asp:Button ID="pid" runat="server" Text='<%#Eval("ProjectId")%>'  style="display:none"/>
                               <%#Eval("ProjectId")%>
                               </ItemTemplate>
                               </asp:TemplateField>
                                <asp:TemplateField  HeaderText="产品型号">
                               <ItemTemplate>
                               <%#Eval("ProjectXh")%>
                               <asp:Button ID="isShow" runat="server" Text='<%#Eval("isShow")%>'  style="display:none"/>
                               </ItemTemplate>
                               </asp:TemplateField>
                                
                                <asp:TemplateField  HeaderText="数量">
                               <ItemTemplate>
                                   <asp:Button ID="numsize" runat="server" Text='<%#Eval("num")%>'  style="display:none"/>
                                  <%#Eval("num")%>
                               </ItemTemplate>
                               </asp:TemplateField>
                                <asp:TemplateField  HeaderText="单价">
                               
                               <ItemTemplate>
                                <%#Eval("Unitprice")%>
                                  
                               </ItemTemplate>
                               </asp:TemplateField>
                                <asp:TemplateField HeaderText="金额" >
                             
                               <ItemTemplate>
                                <%#Eval("Money")%>
                               </ItemTemplate>
                               </asp:TemplateField>
                                <asp:TemplateField HeaderText="净重">
                              
                               <ItemTemplate>
                               <%#Eval("Netweight")%>
                               </ItemTemplate>
                               </asp:TemplateField>
                           <asp:TemplateField HeaderText="最小倍数" >
                               <ItemTemplate>
                                    <asp:Button ID="btnmins" runat="server" Text='<%#Eval("Min")%>'  style="display:none"/>
                             
                                <%#Eval("Min")%>
                               </ItemTemplate>
                               </asp:TemplateField>
                               <asp:TemplateField  HeaderText="最小定量">
                             
                               <ItemTemplate> <asp:Button ID="btnMinQuantitative" runat="server" Text='<%#Eval("MinQuantitative")%>'  style="display:none"/>
                             
                                 <%#Eval("MinQuantitative")%>
                               </ItemTemplate>
                               </asp:TemplateField>

                               <asp:TemplateField  HeaderText="要求日期">
                               <ItemTemplate>
                                <asp:Button ID="btnDate" runat="server" Text='<%#Eval("Date")%>'  style="display:none"/>
                             <%# DataBinder.Eval(Container.DataItem, "Date", "{0:yyyy-MM-dd}") %>
                               </ItemTemplate>
                               </asp:TemplateField>

                                 <asp:TemplateField  HeaderText="操作">
                               <ItemTemplate>
                                <span><a  onclick="ShowBox('ShopEdit.aspx?type=update&ProJectId= <%#Eval("ProjectId")%>')">编辑</a></span>
                                   <asp:LinkButton ID="lk_Del" CommandName='del'  CommandArgument='<%#Eval("ProjectId")%>' OnClientClick="return confirm('您确定要删除?')" runat="server">删除</asp:LinkButton>
                               </ItemTemplate>
                               </asp:TemplateField>
                           </Columns>
                        
                        </asp:GridView>
<%--<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col"><input type="checkbox" />行号</th>
    <th scope="col">产品编号</th>
    <th scope="col">产品型号</th>
    <th scope="col">数量</th>
    <th scope="col">单价</th>
    <th scope="col">金额</th>
    <th scope="col">净重</th>
    <th scope="col">最小倍数</th>
    <th scope="col">最小定量</th>
    <th scope="col">要求日期</th>
    <th scope="col">操作</th>
  </tr>
  <tr>
    <td><input type="checkbox" />01</td>
    <td>00019908</td>
    <td>GR220GN</td>
    <td>1</td>
    <td>17915.072</td>
    <td>17915.072</td>
    <td>180kg</td>
    <td>1</td>
    <td>2</td>
    <td>2012-09-26</td>
    <td><span><a href="#">编辑</a></span><a href="#">删除</a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>--%>
                    
                    </div>
                    
                    <div class="car_cz fix">
						
                        <ul class="car_czL floatleft">
                            <asp:ImageButton ID="Btn_DelAll" runat="server" 
                                ImageUrl="../Common/Image/iconbtnbg/car_plsc.gif" OnClientClick="return SubMit();" onclick="Btn_DelAll_Click" />
                        	<a  onclick="ShowBox('ShopEdit.aspx?type=insert')"><img src="../Common/Image/iconbtnbg/car_tjh.gif" /></a>
                        </ul>
                        
                        <ul class="fenyetwo floatright" style="">
                            <ux:AspNetPager ID="AspNetPager1"  CssClass="paginator" CurrentPageButtonClass="cpb"
                runat="server" AlwaysShow="false" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                PageSize="2" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowNavigationToolTip="true"
                OnPageChanged="AspNetPager1_PageChanged" CustomInfoTextAlign="Left" LayoutType="Table" 
                                CustomInfoHTML="">
            </ux:AspNetPager>
                        </ul>
                    	
                    </div>
                    
                    <div class="car_totle">
						<ul>
                        	<li>未含税总额：</li>
                            <li class="car_totleon" ><%=string.Format("{0:N}", ShopCart.TotalPrice)%>元</li>
                        </ul>
                        <ul>
                            <li>含税总额：</li>
                            <li class="car_totleon" style=" font-size:16px;"><span><%=string.Format("{0:N}", ShopCart.SHTotalPrice)%>元</span></li>
                        </ul>
                        <ul>
                            <li>总净重：</li>
                            <li class="car_totleon" ><%=ShopCart.ToJl %>kg</li>
                        </ul>
                    	<ul style="padding-top:10px;"><%--<a href="SelectAddress.aspx">--%>
                        <asp:ImageButton ImageUrl="../Common/Image/iconbtnbg/car_qrfhdz.gif" runat="server" 
                                ID="imgbtn_click" onclick="imgbtn_click_Click" />
                        <%--<img src="../Common/Image/iconbtnbg/car_qrfhdz.gif"  />--%><%--</a>--%></ul>
                    	<ul style="padding-top:10px;"></ul>
                    </div>
                    
                </ul>
            
            </div>
    <div id="addbalck"></div>
    <div id="warpbox">
	<h1>产品信息<span class="close_span"></span></h1>
    <div class="wprpbox_div">    	
    <iframe id="ifm" scrolling="no" frameborder="0"  width="370" height="290px" style=" padding:0px">
    
    </iframe>
    </div>
</div>
    </form>
</asp:Content>
